/*
 * Holaf Utilities - System Monitor Overlay Styles
 */

#holaf-system-monitor-overlay {
    position: fixed;
    top: 50px; /* Adjust as needed, below the main ComfyUI menu */
    right: 15px;
    width: auto; /* Width will be determined by content */
    min-width: 260px;
    max-width: 380px;
    background-color: rgba(20, 20, 30, 0.65); /* Semi-transparent dark background */
    backdrop-filter: blur(4px); /* Frosted glass effect */
    border: 1px solid rgba(100, 100, 120, 0.4); /* Subtle border */
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    z-index: 10000; /* High z-index to be on top of most UI elements */
    padding: 10px;
    display: flex; /* Using flex for layout of stats and chart */
    flex-direction: column; /* Stack stats above chart */
    gap: 10px; /* Space between stats container and chart */
    pointer-events: none; /* Allow clicks to pass through the overlay */
    color: #E8E8E8; /* Light text color for readability */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 12.5px;
}

/* Container for all textual statistic readouts */
#holaf-system-monitor-overlay #holaf-monitor-stats-text-container {
    display: flex;
    flex-wrap: wrap; /* Allow items to wrap to next line if not enough space */
    gap: 5px 10px; /* Vertical and horizontal gap between stat items */
    width: 100%; /* Take full width of the overlay */
    order: -1; /* Place text stats above the chart */
}

/* Individual stat item (e.g., CPU: 0%, RAM: 0/0GB) */
#holaf-system-monitor-overlay .holaf-monitor-stat-item {
    background-color: rgba(45, 45, 60, 0.7); /* Slightly darker background for each stat item */
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap; /* Prevent text from wrapping within a stat item */
}

/* Styling for the value part of the stat item for better visual distinction */
#holaf-system-monitor-overlay .holaf-monitor-stat-item .value,
#holaf-system-monitor-overlay .holaf-monitor-stat-item .util-value,
#holaf-system-monitor-overlay .holaf-monitor-stat-item .mem-value,
#holaf-system-monitor-overlay .holaf-monitor-stat-item .temp-value {
    font-weight: normal; /* Values might not need to be bold */
    color: #C8C8E0; /* Slightly different color for values */
}

/* Canvas for the main chart */
#holaf-system-monitor-overlay #holaf-main-monitor-chart { /* Main chart canvas for CPU/RAM */
    width: 100% !important; /* Ensure canvas takes full width of its container */
    height: 80px !important; /* Fixed height for the chart */
    display: block; /* Remove extra space below canvas */
    background-color: rgba(40, 40, 55, 0.4); /* Background for the chart area */
    border-radius: 4px;
}

/* Placeholder for individual GPU charts if they are separate canvases */
#holaf-system-monitor-overlay .holaf-gpu-monitor-chart {
    width: 100% !important;
    height: 60px !important; /* Potentially smaller height for GPU charts */
    display: block;
    background-color: rgba(40, 50, 60, 0.4); /* Slightly different bg for GPU charts */
    border-radius: 4px;
    margin-top: 5px; /* Space above each GPU chart if multiple */
}


/* Hide old individual section styling if it was present and not overridden by new layout */
#holaf-system-monitor-overlay .holaf-monitor-section {
    display: none; /* This class was used for old layout, hide it */
}